package com.itheima.mall.service.PmsService;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.mall.mapper.PmsMapper.PmsProductAttributeMapper;
import com.itheima.mall.service.pmsService.PmsProductAttributeApi;
import com.itheima.pojo.pms.PmsProductAttribute;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class PmsProductAttributeImpl implements PmsProductAttributeApi {


    @Autowired
    private PmsProductAttributeMapper productAttributeMapper;

    @Override
    public void save(PmsProductAttribute pmsProductAttribute) {
        productAttributeMapper.insert(pmsProductAttribute);
    }

    @Override
    public void removeByids(List<Long> ids) {
        productAttributeMapper.deleteBatchIds(ids);
    }

    @Override
    public void update(PmsProductAttribute pmsProductAttribute, LambdaQueryWrapper<PmsProductAttribute> wrapper) {
        productAttributeMapper.update(pmsProductAttribute,wrapper);
    }

    @Override
    public PmsProductAttribute selectById(Long id) {
        return productAttributeMapper.selectById(id);
    }

    @Override
    public List<PmsProductAttribute> list(LambdaQueryWrapper<PmsProductAttribute> wrapper) {
        return productAttributeMapper.selectList(wrapper);
    }

    @Override
    public Page<PmsProductAttribute> page(Page<PmsProductAttribute> pageInfo, LambdaQueryWrapper<PmsProductAttribute> wrapper) {
        return productAttributeMapper.selectPage(pageInfo,wrapper);
    }
}
